<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .nav {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
            background-color: #333;
        }

        .nav li {
            position: relative;
        }

        .nav li a {
            display: block;
            padding: 15px 20px;
            color: white;
            text-decoration: none;
            transition: background-color 0.3s;
        }

        .nav li:hover a {
            background-color: #555;
        }

        .nav li ul {
            position: absolute;
            top: 100%;
            left: 0;
            background-color: #333;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }

        .nav li:hover ul {
            opacity: 1;
            visibility: visible;
        }

        .nav li ul li {
            width: 200px;
        }

        .nav li ul a {
            color: white;
            padding: 10px 15px;
            transition: background-color 0.3s;
        }

        .nav li ul li:hover a {
            background-color: #555;
        }
    </style>

</head>
<body>

<ul class="nav">
    <li><a href="#">Главная</a></li>
    <li>
        <a href="#">Услуги</a>
        <ul>
            <li><a href="#">Веб-разработка</a></li>
            <li><a href="#">Дизайн</a></li>
            <li><a href="#">Маркетинг</a></li>
        </ul>
    </li>
    <li><a href="#">О нас</a></li>
    <li><a href="#">Контакты</a></li>
</ul>
</body>
</html>